package com.ysh.xiaomi.service.impl;

import com.ysh.xiaomi.dao.AddressDao;
import com.ysh.xiaomi.dao.impl.AddressDaoImpl;
import com.ysh.xiaomi.pojo.TbAddress;
import com.ysh.xiaomi.service.AddressService;

import javax.mail.Address;
import java.util.List;

/**
 * 袁胜虎 on 2022/8/18 19:39
 */
public class AddressServiceImpl implements AddressService {
    AddressDao addressDao = new AddressDaoImpl();
    @Override
    public List<TbAddress> findAllAddressByUserId(Long userId) {
        return  addressDao.findAllAddressByUserId(userId);
    }

    @Override
    public int saveAddress(TbAddress address) {
            return addressDao.insertAddress(address);
    }

    @Override
    public void deleteAddressByAid(String aid) {
        addressDao.deleteAddressByAid(aid);
    }
}
